//------------------------------------------------------------------------------
// 数据访问层的实现
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Data.Entity.Infrastructure;
using System.Linq;
using System.Text;
using System.Data.Entity;
using System.Data;

namespace Wyn.PMS.Entity.Construction
{
    public class BizDayRepository 
    {
        public List<HotelBizDay> FindAll(string hotelId)
        {
            using (DbContext context = new BaseContext())
            {
                return context.Set<HotelBizDay>().ToList();
            }

        }
    }

    public partial class BaseContext : DbContext
    {
        public BaseContext()
            : base("name=PmsBaseEntities")
        {
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            throw new UnintentionalCodeFirstException();
        }

        public DbSet<HotelBizDay> HotelBizDay { get; set; }
    }
}
